package com.schoolCommunity.community.controller;


import com.schoolCommunity.community.entity.DTO.LoginParam;
import com.schoolCommunity.community.entity.common.Result;
import com.schoolCommunity.community.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author liuhongbin
 * @since 2023-12-14
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    @Lazy
    private IUserService userService;
    @PostMapping("/api/login")
    public Result login(@RequestBody LoginParam loginParam){
        return userService.login(loginParam);
    }
}
